package com.xja.git.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

public class Conmment implements Serializable {
    private Integer id;

    private String authorname;

    private String authorsite;

    private String authormail;

    private String content;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH-mm-ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH-mm-ss")
    private Date posttime;

    private String postip;

    private Integer entryid;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAuthorname() {
        return authorname;
    }

    public void setAuthorname(String authorname) {
        this.authorname = authorname == null ? null : authorname.trim();
    }

    public String getAuthorsite() {
        return authorsite;
    }

    public void setAuthorsite(String authorsite) {
        this.authorsite = authorsite == null ? null : authorsite.trim();
    }

    public String getAuthormail() {
        return authormail;
    }

    public void setAuthormail(String authormail) {
        this.authormail = authormail == null ? null : authormail.trim();
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content == null ? null : content.trim();
    }

    public Date getPosttime() {
        return posttime;
    }

    public void setPosttime(Date posttime) {
        this.posttime = posttime;
    }

    public String getPostip() {
        return postip;
    }

    public void setPostip(String postip) {
        this.postip = postip == null ? null : postip.trim();
    }

    public Integer getEntryid() {
        return entryid;
    }

    public void setEntryid(Integer entryid) {
        this.entryid = entryid;
    }

    public Conmment() {
    }

    public Conmment(Integer id, String authorname, String authorsite, String authormail, String content, Date posttime, String postip, Integer entryid) {
        this.id = id;
        this.authorname = authorname;
        this.authorsite = authorsite;
        this.authormail = authormail;
        this.content = content;
        this.posttime = posttime;
        this.postip = postip;
        this.entryid = entryid;
    }

    public Conmment(String authorname, String authorsite, String authormail, String content, Date posttime, String postip, Integer entryid) {
        this.authorname = authorname;
        this.authorsite = authorsite;
        this.authormail = authormail;
        this.content = content;
        this.posttime = posttime;
        this.postip = postip;
        this.entryid = entryid;
    }

    @Override
    public String toString() {
        return "Conmment{" +
                "id=" + id +
                ", authorname='" + authorname + '\'' +
                ", authorsite='" + authorsite + '\'' +
                ", authormail='" + authormail + '\'' +
                ", content='" + content + '\'' +
                ", posttime=" + posttime +
                ", postip='" + postip + '\'' +
                ", entryid=" + entryid +
                '}';
    }
}